const http = require("http");
const fs = require("fs");
const path = require("path");

http.createServer((req, res) => {
    let filePath = path.join(__dirname, "demo1.html");
    fs.readFile(filePath, (err, data) => {
        if (err) {
            console.log(err);
        }
        else {
            res.end(data.toString());
        }
    })
}).listen(8080)
console.log("server is listening 8080")